package com.stx.jeepay.payment.channel;

import com.stx.jeepay.core.entity.MchDivisionReceiverEntity;
import com.stx.jeepay.core.entity.PayOrderDivisionRecordEntity;
import com.stx.jeepay.core.entity.PayOrderEntity;
import com.stx.jeepay.payment.model.MchAppConfigContext;
import com.stx.jeepay.payment.rqrs.msg.ChannelRetMsg;

import java.util.HashMap;
import java.util.List;

/**
 * 分账接口
 */
public interface IDivisionService {

    /** 获取到接口code **/
    String getIfCode();

    /** 是否支持该分账 */
    boolean isSupport();

    /** 绑定关系 **/
    ChannelRetMsg bind(MchDivisionReceiverEntity mchDivisionReceiver, MchAppConfigContext mchAppConfigContext);

    /** 单次分账 （无需调用完结接口，或自动解冻商户资金)  **/
    ChannelRetMsg singleDivision(PayOrderEntity payOrder, List<PayOrderDivisionRecordEntity> recordList, MchAppConfigContext mchAppConfigContext);

    /** 查询分账结果  **/
    HashMap<Long, ChannelRetMsg> queryDivision(PayOrderEntity payOrder, List<PayOrderDivisionRecordEntity> recordList, MchAppConfigContext mchAppConfigContext);
}
